home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / program / bgui12.lha / demos / BGUIPlayer / BGUIPlayer.h < prev    next >
C/C++ Source or Header  |  1995-05-21  |  5KB  |  188 lines

  1. #ifndef BGUIPLAYER_H
  2. #define BGUIPLAYER_H
  3. /*
  4.  *      BGUIPLAYER.H
  5.  */
  6.  
  7. #include <exec/types.h>
  8. #include <exec/memory.h>
  9. #include <exec/io.h>
  10. #include <devices/scsidisk.h>
  11. #include <devices/timer.h>
  12. #include <libraries/bgui.h>
  13. #include <libraries/bgui_macros.h>
  14. #include <intuition/icclass.h>
  15.  
  16. #include <proto/exec.h>
  17. #include <proto/bgui.h>
  18. #include <proto/intuition.h>
  19. #include <proto/dos.h>
  20.  
  21. #include <clib/alib_protos.h>
  22.  
  23. #include <stdlib.h>
  24. #include <stdio.h>
  25. #include <string.h>
  26.  
  27. #include "BGUIPlayer_rev.h"
  28.  
  29. /*
  30.  *      For DICE it's "MakeProto" tool which
  31.  *      automatically generates a prototypes
  32.  *      header included at the end of this
  33.  *      file.
  34.  */
  35. #define Prototype               extern
  36.  
  37. /*
  38.  *      BGUI object ID's.
  39.  */
  40. #define ID_PLAY                         21
  41. #define ID_PAUSE                        22
  42. #define ID_STOP                         23
  43. #define ID_PREV                         24
  44. #define ID_NEXT                         25
  45. #define ID_BACKWARD                     26
  46. #define ID_FORWARD                      27
  47. #define ID_EJECT                        28
  48. #define ID_VOLUME                       29
  49. #define ID_INQUIRE                      30
  50. #define ID_ABOUT                        31
  51. #define ID_QUIT                         32
  52. #define ID_HIDE                         33
  53. #define ID_EDIT                         34
  54.  
  55. #define ID_DISKLIST                     1
  56. #define ID_CD                           2
  57. #define ID_ARTIST                       3
  58. #define ID_LABEL                        4
  59. #define ID_TRACK                        5
  60. #define ID_SAVEDISK                     6
  61.  
  62. /*
  63.  *      Commodity hotkeys.
  64.  */
  65. #define CXK_POPUP                       21
  66.  
  67. /*
  68.  *      For the configuration file parser (Config.c).
  69.  */
  70. typedef struct {
  71.         UBYTE           *cc_Name;
  72.         UBYTE           *cc_ArgTemplate;
  73.         VOID           (*cc_Func)( ULONG * );
  74. } CONFIGCOMM;
  75.  
  76. /*
  77.  *      Compiler muck.
  78.  */
  79. #ifdef _DCC
  80. #define SAVEDS __geta4
  81. #define ASM
  82. #define REG(x) __ ## x
  83. #else
  84. #define SAVEDS __saveds
  85. #define ASM __asm
  86. #define REG(x) register __ ## x
  87. #endif
  88.  
  89. /*
  90.  *      All below definitions were taken from
  91.  *      the MultiCDPlayer V1.0 header by
  92.  *      Boris Jakubaschk.
  93.  *
  94.  *      Since I have no info on the ANSI SCSI-2
  95.  *      specifications I can't tell you what it
  96.  *      all means.
  97.  */
  98. #define SENSE_LEN               252
  99. #define MAX_DATA_LEN            252
  100. #define MAX_TOC_LEN             804
  101.  
  102. struct SCSICmd6 {
  103.         UBYTE           Opcode;
  104.         UBYTE           B1;
  105.         UBYTE           B2;
  106.         UBYTE           B3;
  107.         UBYTE           B4;
  108.         UBYTE           Control;
  109. };
  110.  
  111. struct SCSICmd10 {
  112.         UBYTE           Opcode;
  113.         UBYTE           B1;
  114.         UBYTE           B2;
  115.         UBYTE           B3;
  116.         UBYTE           B4;
  117.         UBYTE           B5;
  118.         UBYTE           B6;
  119.         UBYTE           B7;
  120.         UBYTE           B8;
  121.         UBYTE           Control;
  122. };
  123.  
  124. struct SCSICmd12 {
  125.         UBYTE           Opcode;
  126.         UBYTE           B1;
  127.         UBYTE           B2;
  128.         UBYTE           B3;
  129.         UBYTE           B4;
  130.         UBYTE           B5;
  131.         UBYTE           B6;
  132.         UBYTE           B7;
  133.         UBYTE           B8;
  134.         UBYTE           B9;
  135.         UBYTE           B10;
  136.         UBYTE           Control;
  137. };
  138.  
  139. #define SCSI_CMD_TUR                    0x00
  140. #define SCSI_CMD_RZU                    0x01
  141. #define SCSI_CMD_RQS                    0x03
  142. #define SCSI_CMD_FMU                    0x04
  143. #define SCSI_CMD_RAB                    0x07
  144. #define SCSI_CMD_RD                     0x08
  145. #define SCSI_CMD_WR                     0x0A
  146. #define SCSI_CMD_SK                     0x0B
  147. #define SCSI_CMD_INQ                    0x12
  148. #define SCSI_CMD_MSL                    0x15
  149. #define SCSI_CMD_RU                     0x16
  150. #define SCSI_CMD_RLU                    0x17
  151. #define SCSI_CMD_MSE                    0x1A
  152. #define SCSI_CMD_SSU                    0x1B
  153. #define SCSI_CMD_RDI                    0x1C
  154. #define SCSI_CMD_SDI                    0x1D
  155. #define SCSI_CMD_PAMR                   0x1E
  156. #define SCSI_CMD_RCP                    0x25
  157. #define SCSI_CMD_RXT                    0x28
  158. #define SCSI_CMD_WXT                    0x2A
  159. #define SCSI_CMD_SKX                    0x2B
  160. #define SCSI_CMD_WVF                    0x2E
  161. #define SCSI_CMD_VF                     0x2F
  162. #define SCSI_CMD_RDD                    0x37
  163. #define SCSI_CMD_WDB                    0x3B
  164. #define SCSI_CMD_RDB                    0x3C
  165.  
  166. #define SCSI_CMD_COPY                   0x18
  167. #define SCSI_CMD_COMPARE                0x39
  168. #define SCSI_CMD_COPYANDVERIFY          0x3A
  169. #define SCSI_CMD_CHGEDEF                0x40
  170. #define SCSI_CMD_READSUBCHANNEL         0x42
  171. #define SCSI_CMD_READTOC                0x43
  172. #define SCSI_CMD_READHEADER             0x44
  173. #define SCSI_CMD_PLAYAUDIO12            0xA5
  174. #define SCSI_CMD_PLAYAUDIOTRACKINDEX    0x48
  175. #define SCSI_CMD_PAUSERESUME            0x4B
  176.  
  177. #define SCSI_STAT_NO_DISK               0       /* No CD in the drive.  */
  178. #define SCSI_STAT_PLAYING               1       /* Audio playing.       */
  179. #define SCSI_STAT_STOPPED               2       /* Drive motor stopped. */
  180. #define SCSI_STAT_PAUSED                3       /* Audio paused.        */
  181.  
  182. /*
  183.  *      As generated by "MakeProto".
  184.  */
  185. #include "BGUIPlayer_protos.h"
  186.  
  187. #endif
  188.